import {commonConfig} from "../common";
import {tableOptBtnConfig} from "../table";

export default {
  "tableId": "generalParam",
  "name": "通用参数名",
  "columns": [
    {
      label: '设备类别',
      children: [
        {
          key: 'deviceTypeText',
        },
      ],
    },
    {
      label: '参数类型',
      children: [
        {
          key: 'typeText',
        },
      ],
    },
    {
      label: '参数名',
      children: [
        {
          key: 'name',
        },
      ],
    },
    {
      label: '参数别名',
      children: [
        {
          key: 'alias',
        },
      ],
    },
    {
      label: '备注',
      children: [
        {
          key: 'remarks',
        }
      ],
    },
    {
      label: '更新时间',
      width: 100,
      children: [
        {
          updatedDate: true
        }
      ],
    },
    {
      "label": "操作",
      "operation": true,
      "width": 220,
      "children": [
        {
          "button": true,
          type: tableOptBtnConfig.edit.type,
        },
        {
          "button": true,
          type: tableOptBtnConfig.copy.type,
          class: 'hover-success',
        },
        {
          "button": true,
          type: tableOptBtnConfig.delete.type,
          class: 'hover-danger',
        }
      ]
    }
  ],
  "filters": [
    {
      "fieldType": "string",
      key: 'deviceType',
      label: '设备类别',
      "dataApi": API.deviceType.deviceTypeAll,
      "options": []
    },
    {
      "fieldType": "string",
      key: 'type',
      label: '参数类型',
      options: commonConfig.genParamType
    },
    {
      "fieldType": "input",
      key: 'name',
      label: '参数名',
    },
    {
      "fieldType": "input",
      key: 'alias',
      label: '参数别名',
    },
    {
      "fieldType": "input",
      key: 'remarks',
      label: '备注',
    },
  ]
}
